package net.itbaiyang.pattern.sms;

import net.itbaiyang.pattern.component.SmsComponent;
import net.itbaiyang.pattern.component.adapter.SenderAdapter;
import net.itbaiyang.pattern.controller.request.SmsRequest;
import net.itbaiyang.pattern.util.JsonData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("customTencentSmsService")
// 腾讯云短信服务实现
public class TencentSmsService implements SmsService {

    @Autowired
    SenderAdapter send;

    @Override
    public JsonData sendSms(SmsRequest request) {
        // 腾讯云短信发送逻辑...
        return send.tencentSendCode(request.getPhoneNumber(),request.getMessage());
    }
}
